Leadtools.Dicom.Common
LEAD Technologies, Inc

GetNewViewPerspective(RasterViewPerspective,Double[],PlaneOrientation) Method

Example 





The input Leadtools.RasterViewPerspective to which the Leadtools.Dicom.Common.DataTypes.PlaneOrientation will be applied.
The row and column orientation vectors (or direction cosine vectors) that apply to viewPerspectiveOriginal
A Leadtools.Dicom.Common.DataTypes.PlaneOrientation that is applied to the original Leadtools.RasterViewPerspective
Gets a new Leadtools.RasterViewPerspective that results from applying a Leadtools.Dicom.Common.DataTypes.PlaneOrientation to a given Leadtools.RasterViewPerspective and two given direction cosine vectors.
Syntax
'Declaration
 
Public Overloads Shared Function GetNewViewPerspective( _
   ByVal viewPerspectiveOriginal As RasterViewPerspective, _
   ByVal imageOrientationVectors() As Double, _
   ByVal po As PlaneOrientation _
) As RasterViewPerspective
'Usage
 
Dim viewPerspectiveOriginal As RasterViewPerspective
Dim imageOrientationVectors() As Double
Dim po As PlaneOrientation
Dim value As RasterViewPerspective
 
value = DicomExtensions.GetNewViewPerspective(viewPerspectiveOriginal, imageOrientationVectors, po)
 function Leadtools.Dicom.Common.Extensions.DicomExtensions.GetNewViewPerspective(RasterViewPerspective,Double[],PlaneOrientation)( 
   viewPerspectiveOriginal ,
   imageOrientationVectors ,
   po 
)

Parameters

viewPerspectiveOriginal
The input Leadtools.RasterViewPerspective to which the Leadtools.Dicom.Common.DataTypes.PlaneOrientation will be applied.
imageOrientationVectors
The row and column orientation vectors (or direction cosine vectors) that apply to viewPerspectiveOriginal
po
A Leadtools.Dicom.Common.DataTypes.PlaneOrientation that is applied to the original Leadtools.RasterViewPerspective

Return Value

Remarks
The input view perspective is define by two values: the original Leadtools.RasterViewPerspective (viewPerspectiveOriginal), and a row and column orientation vector (imageOrientationVectors). This method returns the new Leadtools.RasterViewPerspective that results from applying a Leadtools.Dicom.Common.DataTypes.PlaneOrientation to the input view perspective.
Example
Copy CodeCopy Code  
Public Sub GetNewViewPerspectiveExample()
   ' Create a new coronal PlaneOrientation that corresponds to a horizontal flip
   Dim poCoronal As New PlaneOrientation()
   poCoronal.Name = "Coronal or Frontal"

   ' This corresponds to a horizontal flip
   poCoronal.Top = OrientationAxis.Inferior
   poCoronal.Right = OrientationAxis.Right

   ' This condition is ignored
   Dim condition As New TagValueOrientationCondition(DicomTag.ImageOrientationPatient, Nothing)
   poCoronal.Condition = condition

   ' This specifies a row and column orientation vector that correspond to a coronal slice
   ' Row: (1,0,0)
   ' Col: (0,0,-1)
   Dim imageOrientationVectors() As Double = {1, 0, 0, 0, 0, -1}

   ' Find the new view perspective
   Dim newViewPerspective As RasterViewPerspective = DicomExtensions.GetNewViewPerspective(RasterViewPerspective.TopLeft, imageOrientationVectors, poCoronal)

   ' New view perspective should be BottomLeft
   MessageBox.Show("newViewPerspective should be BottomLeft" & Constants.vbLf & "Actual newViewPerspective is " & newViewPerspective.ToString())
End Sub
public void GetNewViewPerspectiveExample()
{
   // Create a new coronal PlaneOrientation that corresponds to a horizontal flip
   PlaneOrientation poCoronal = new PlaneOrientation();
   poCoronal.Name = "Coronal or Frontal";

   // This corresponds to a horizontal flip
   poCoronal.Top = OrientationAxis.Inferior;
   poCoronal.Right = OrientationAxis.Right;

   // This condition is ignored
   TagValueOrientationCondition condition = new TagValueOrientationCondition(DicomTag.ImageOrientationPatient, null);
   poCoronal.Condition = condition;

   // This specifies a row and column orientation vector that correspond to a coronal slice
   // Row: (1,0,0)
   // Col: (0,0,-1)
   double[] imageOrientationVectors = new double[6] { 1, 0, 0, 0, 0, -1 };

   // Find the new view perspective
   RasterViewPerspective newViewPerspective = DicomExtensions.GetNewViewPerspective(RasterViewPerspective.TopLeft, imageOrientationVectors, poCoronal);

   // New view perspective should be BottomLeft
   MessageBox.Show("newViewPerspective should be BottomLeft\nActual newViewPerspective is " + newViewPerspective.ToString());
}
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

DicomExtensions Class
DicomExtensions Members
Overload List

 

 


Products | Support | Contact Us | Copyright Notices

© 2006-2012 All Rights Reserved. LEAD Technologies, Inc.

Leadtools.Dicom.Common requires a Document or Medical toolkit license and unlock key. For more information, refer to: Imaging Pro/Document/Medical Features